using System;
using System.Collections.Generic;
using System.Text;

using Liberty.Domain.Kernel;
using Peradigm.Framework.Domain.Security;

using Microsoft.VisualStudio.TestTools.UnitTesting;
//using NUnit.Framework.SyntaxHelpers;

namespace Tests.DomainTests.Kernel {

#if DEBUG
    [TestClass()]
    public class TaskTests : Object {
        #region Constants
        private const string
            FIRST_NAME          = "TestFirstName",
            LAST_NAME           = "TestLastName",
            LONG_DESCRIPTION    = "Test Long Description",
            SHORT_DESCRIPTION   = "Test Short Description";

        private const long
            EMPLOYEE_ID = 56L;
        #endregion

        #region SetUp and TearDown TaskTests
        [TestInitialize()]
        public void SetUpTaskTests()
        {
        }

        [TestCleanup()]
        public void TearDownTaskTests()
        {
        }
        #endregion

        #region Test Methods
        [TestMethod()]
        public void TestMakeComplete()
        {
            Task aTask = new Task();
            Assert.IsFalse( aTask.IsComplete );

            DateTime completedOn = DateTime.Now;
            User aUser = new User( EMPLOYEE_ID, FIRST_NAME, LAST_NAME );
            aTask.MakeComplete( completedOn, aUser );
            Assert.IsTrue( aTask.IsComplete );
            Assert.AreEqual( completedOn, aTask.CompletedOn );
            Assert.AreEqual( aUser.FirstName, aTask.CompletedBy.FirstName );

            DateTime dueOn = DateTime.Now;
            aTask.DueOn = dueOn;
            Assert.AreEqual( dueOn, aTask.DueOn );

            aTask.LongDescription = LONG_DESCRIPTION;
            Assert.AreEqual( LONG_DESCRIPTION, aTask.LongDescription );

            DateTime remindOn = DateTime.Now;
            aTask.RemindOn = remindOn;
            Assert.AreEqual( remindOn, aTask.RemindOn );

            aTask.ShortDescription = SHORT_DESCRIPTION;
            Assert.AreEqual( SHORT_DESCRIPTION, aTask.ShortDescription );            
        }
        #endregion

        #region Support Methods
        #endregion

        #region Data Elements
        #endregion

    }
#endif

}
